Activity Diagram for the Car Rental System

Create some activity diagrams for the car rental system problem

Activities diagrams are a great way to visualize the flow of messages from one activity to the other in the system. There can be different activity diagrams that we can create for our car rental system. In this lesson, we will create activity diagrams for the following two activities:

  • Vehicle pickup

  • Activity challenge: Vehicle return

Vehicle pickup#

The states and actions that will be involved in this activity diagram are given below.

States#

Initial state: A member with a vehicle booking comes to the rent-a-car reception to pick up the vehicle.

Final state: The guest either successfully gets the vehicle or the system shows a reservation error.

Actions#

The member with a vehicle reservation arrives at the rent-a-car reception. The receptionist validates the reservation and updates the vehicle status.

Based on the order above, the activity diagram of the vehicle pickup from the car rental facility is given below.

The activity diagram for vehicle pickup
The activity diagram for vehicle pickup

Activity challenge: Vehicle return#

You will help us create an activity diagram of a member who wants to return the vehicle.

Here is the activity diagram structure:

The activity diagram for vehicle return
The activity diagram for vehicle return

Notice that the actions in the diagram above are numbered from 1 to 9. The slots below represent the activities, and the arrows represent the flow from one activity to the other. Can you rearrange the slots below in the correct order they should appear in the activity diagram given above?

Note: If you get stuck, just click the “Show Solution” button to check the correct answer.

Fill the missing slots with the correct actions for a member who wants to return the vehicle.

The receptionist scans member ID

Calculate the fine

Add fine to the bill

Calculate the fine

Add fine to the bill

Calculate the fine

Add fine to the bill

The member performs transaction

Update the vehicle status


We've looked at some of the activity diagrams of our car rental system. In the next lesson, we will present the code for our designed classes in some of the most popular languages.

Sequence Diagram for the Car Rental System

Code for the Car Rental System